<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CM_byFood.aspx.cs" Inherits="WebMenu.CM_byFood" %>
<%@ Register TagPrefix="cr" TagName="WUC_NavTabs" Src="~/WUC_NavTabs.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_LeftPanel" Src="~/WUC_LeftPanel.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_RightPanel" Src="~/WUC_RightPanel.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_Footer" Src="~/WUC_Footer.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_HtmlHeadTag" Src="~/WUC_HtmlHeadTag.ascx" %>
<%@ Register Src="WUC_ToggleButton.ascx" TagName="WUC_ToggleButton" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<%--<html xmlns="http://www.w3.org/1999/xhtml" >--%>
<head id="Head1" runat="server">
  <title> CheckMenu - Search By Food </title>
  <cr:WUC_HtmlHeadTag id="WUC_HtmlHeadTag_02" runat="server" />    

</head>
    <script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAXg-1e7LbaB0NNB4KY0h0-BQWFt-7OBZKMPMlsVYvuUdvLO58RBSi6mMmr-RK5Y90BBnpyvt7UFoIfA"></script>

    <script type="text/javascript"> google.load("maps", "2.x"); </script>

    <script type="text/javascript"> 

    function drawGmap() { 
        var dLat = document.getElementById("hidLatitude").value;
        var dLong = document.getElementById("hidLongitude").value;
        var sAddress = document.getElementById("hidShopDetails").value;
        var map = new google.maps.Map2(document.getElementById("map"));
        map.setUIToDefault();
        var point = new GLatLng(dLat, dLong);
        map.addOverlay(new GMarker(point));
        map.setCenter(new google.maps.LatLng(dLat, dLong), 15);         
        var shtml = "100 <b>He</b>llo";
        map.openInfoWindowHtml(map.getCenter(), sAddress);  //map.openInfoWindow(map.getCenter(), document.createTextNode(hidText.value));

    } 
    
    function drawGmapIfOK(){
        var dLat = document.getElementById("hidLatitude").value;
        if( dLat != ""){
            drawGmap();
        }
    }
    
    </script>
<body onunload="GUnload()">

<div id="L1background" > 
<div id="L2Header" >    

	<div class="floatleft">		<img class="imgMain" src="images/CMLogo01.gif" width="250" alt="Logo" /> </div>

    <div id="L3HeaderMenu" >
  <ul id="navbut">
<cr:WUC_NavTabs id="WUC_NavTabs1" runat="server" />      
</ul>

    </div>

</div>
 <div class="HorizSeparator" >    </div>
 
<div class="container">
<div class="header"></div>
<div class="left">
<cr:WUC_LeftPanel id="WUC_LeftPanel1" runat="server" />    
</div>
<div class="right">
<cr:WUC_RightPanel id="WUC_RightPanel1" runat="server" />    
</div>
<div class="content">
	<h3>Under Construction - More shops to be added</h3>
    <form id="form1" runat="server">
    <fieldset><legend>Choose Shop from Food</legend>
    <div> 
        <table width="100%"><tr align="center">
        <td style="width: 200px; height: 50px">Cuisine <br/>
            <asp:dropdownlist id="cuisineFDropList"  AutoPostBack="True" runat="server" OnSelectedIndexChanged="cuisineFDropList_SelectedIndexChanged"  >
            <asp:ListItem Text="(Select a Cuisine)" />     </asp:dropdownlist>
        </td>
        <td style="width: 90px; height: 50px">
            <img src="images/yellow-right-arrow.gif" alt="right arrow" height="30" />
        </td>
        <td style="width: 200px; height: 50px">Category <br/>
            <asp:dropdownlist id="categoryDropList" AutoPostBack="True" runat="server" OnSelectedIndexChanged="categoryDropList_SelectedIndexChanged"  >
            <asp:ListItem Text="(Select a Category)" Value="" /> </asp:dropdownlist>
        </td> 
        <td style="width: 90px; height: 50px">
            <img src="images/yellow-right-arrow.gif" alt="right arrow" height="30" />
        </td>        
        <td style="width: 300px; height: 50px">
            Food Name<br/>
            <asp:dropdownlist id="foodDropList" AutoPostBack="True" runat="server" Width="151px" OnSelectedIndexChanged="foodDropList_SelectedIndexChanged" >
            <asp:ListItem Text="(Select a Food)" /> </asp:dropdownlist>&nbsp;</td>
        
        </tr></table>
    </div>
    </fieldset>    
    
    <div>
        &nbsp;</div>
    <asp:TextBox ID="tb_Messages" runat="server" Height="38px"
        Width="449px" BorderStyle="None" Font-Bold="True" Font-Italic="True" Rows="3" ReadOnly="True"></asp:TextBox><br />
        <em>Prices may not be up to date at the moment</em><br />
        <asp:GridView ID="gvShop" runat="server" AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None"
        OnRowDataBound="gvShop_RowDataBound"
        OnPageIndexChanging="gvShop_PageIndexChanging" OnSorting="gvShop_Sorting" Width="95%"
        >
            
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        
            <Columns>
                <asp:BoundField ReadOnly="True" >
                    <ItemStyle Width="0px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="map">
                    <ItemTemplate>       
<asp:LinkButton ID="lnk_ShopName" runat="server" Text="__" Tooltip="Click to open Map"
CommandArgument='<%# Eval("name") %>'
style="background-image: url(images/map-globe-icon-2small.gif); background-repeat:no-repeat; background-color:Transparent;"
OnClick="lnk_ShopName_Click">
</asp:LinkButton>
                    </ItemTemplate>
                
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <br />
        <br />
        Map Section<br />
        <input id="butMap" runat="server" type="button" value="Refresh" onclick="drawGmapIfOK()"/>
        <input id="hidLatitude" runat="server" type="hidden" />
        <input id="hidLongitude" runat="server" type="hidden" />
        <input id="hidShopDetails" runat="server" type="hidden" /><br />
        <div id="map" runat="server" style="width: 500px; height: 500px">
        </div>
    </form>


</div>
</div>


<!-- 
</DIV>  -->

 <div class="HorizSeparator" >    </div>
<div id="L2Footer" >    

<cr:WUC_Footer id="Footer3" var1="hello" runat="server" />    
    <br />
    <br />
    <br />


</div> 

</div> 

</body>
</html>
